package main.test.SparkAPI.Baics.singletonObj
abstract class Robot(name: String) {
  def welcome: String
  def myname: String = name

}
object Robot {
  def mostTalkative(r1:Robot,r2:Robot) :Robot = {
    val r1Size = r1.welcome.length
    val r2Size = r2.welcome.length
    if (r1Size >= r2Size) r1 else r2
  }



}
